package net.lijingye.education.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by LijingYe on 2016/4/4.
 */
@Entity
@Table(name = "visitor")
public class Visitor implements Serializable {
    @Id
    @OneToOne
    @JoinColumn(name = "userId")
    private User user;

    @Id
    @OneToOne
    @JoinColumn(name = "visitorId")
    private User visitor;

    @Column(name = "time")
    private Date time;

    public Visitor() {
    }

    public Visitor(User user, User visitor, Date time) {
        this.user = user;
        this.visitor = visitor;
        this.time = time;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public User getVisitor() {
        return visitor;
    }

    public void setVisitor(User visitor) {
        this.visitor = visitor;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }


}
